<%@ page import="java.sql.*" %>
<%@ page import="java.util.Vector" %>
<%@ page import="edu.boun.cmpe.elele.cotrans.dbOperations.DbOperations" %>
<%
            //Integer uID=Integer.parseInt(session.getAttribute("userid").toString());
            String uname = request.getParameter("username").toString();
            DbOperations db = new DbOperations();
            Vector<String> data = db.getReceivedPendingInvitations(2);
            int invID;
            int s = data.size() / 4;
            String list = "";
%>
<table><thead><tr><td>Pending Invitations</td><td></td><td></td></tr><tr><td>From</td><td>Date</td><td>Article</td></tr></thead><tbody>
        <%

                    for (int i = 0; i < s; i++) {
                        invID = Integer.parseInt(data.remove(0));%>
    <input id="invID" type="hidden" value="<%=invID%>">
    <tr><td><%=data.remove(0)%></td><td><%=data.remove(0)%></td><td><%=data.remove(0)%></td>
    </tr>
    <div class="ui-dialog ui-widget ui-widget-content ui-corner-all ui-draggable" style="overflow: hidden; display: block; position: absolute; z-index: 1002; outline-color: -moz-use-text-color; outline-style: none; outline-width: 0px; height: auto; width: 300px; top: 225px; left: 468.5px;" tabindex="-1" role="dialog" aria-labelledby="ui-dialog-title-dialog">
        <div class="ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix" unselectable="on" style="-moz-user-select: none;">
            <span id="ui-dialog-title-dialog" class="ui-dialog-title" unselectable="on" style="-moz-user-select: none;">Accept or Reject the Invitation</span>
            <a class="ui-dialog-titlebar-close ui-corner-all" href="#" role="button" unselectable="on" style="-moz-user-select: none;">
                <span class="ui-icon ui-icon-closethick" unselectable="on" style="-moz-user-select: none;">close</span>
            </a>
        </div>
        <div id="dialog" class="ui-dialog-content ui-widget-content" style="height: 49px; min-height: 59px; width: auto;">
            <p>
                <span class="ui-icon ui-icon-alert" style="margin: 0pt 7px 20px 0pt; float: left;"/>
                If you want to work on this translation, click accept button.
            </p>
        </div>
        <div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix">
            <button class="ui-state-default ui-corner-all" type="button" onClick="accepted()">Accept</button>
            <button class="ui-state-default ui-corner-all" type="button" onClick="rejected()">Reject</button>
        </div>
    </div>
</tbody></table>
